3.220 \(\int \frac {\sec (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx\)

Optimal. Leaf size=16 \[ \frac {\tanh ^{-1}\left (\sin ^2(c+d x)\right )}{2 d} \]

[Out]

1/2*arctanh(sin(d*x+c)^2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {275, 206} \[ \frac {\tanh ^{-1}\left (\sin ^2(c+d x)\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

ArcTanh[Sin[c + d*x]^2]/(2*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 275

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m + 1, n]}, Dist[1/k, Subst[Int[x^((m
 + 1)/k - 1)*(a + b*x^(n/k))^p, x], x, x^k], x] /; k != 1] /; FreeQ[{a, b, p}, x] && IGtQ[n, 0] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\sec (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x}{1-x^4} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {\tanh ^{-1}\left (\sin ^2(c+d x)\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 30, normalized size = 1.88 \[ \frac {\log \left (2-\cos ^2(c+d x)\right )-2 \log (\cos (c+d x))}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

(-2*Log[Cos[c + d*x]] + Log[2 - Cos[c + d*x]^2])/(4*d)

________________________________________________________________________________________

fricas [B]  time = 0.50, size = 30, normalized size = 1.88 \[ \frac {\log \left (-\cos \left (d x + c\right )^{2} + 2\right ) - 2 \, \log \left (-\cos \left (d x + c\right )\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(log(-cos(d*x + c)^2 + 2) - 2*log(-cos(d*x + c)))/d

________________________________________________________________________________________

giac [B]  time = 0.28, size = 79, normalized size = 4.94 \[ -\frac {2 \, \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) - \log \left ({\left | -\frac {6 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 1 \right |}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(2*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)) - log(abs(-6*(cos(d*x + c) - 1)/(cos(d*x + c) + 1
) + (cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.09, size = 19, normalized size = 1.19 \[ \frac {\ln \left (2 \left (\sec ^{2}\left (d x +c \right )\right )-1\right )}{4 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

1/4/d*ln(2*sec(d*x+c)^2-1)

________________________________________________________________________________________

maxima [B]  time = 0.47, size = 39, normalized size = 2.44 \[ \frac {\log \left (\sin \left (d x + c\right )^{2} + 1\right ) - \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(log(sin(d*x + c)^2 + 1) - log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1))/d

________________________________________________________________________________________

mupad [B]  time = 0.61, size = 14, normalized size = 0.88 \[ \frac {\mathrm {atanh}\left ({\sin \left (c+d\,x\right )}^2\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)*(sin(c + d*x) + 1/sin(c + d*x))),x)

[Out]

atanh(sin(c + d*x)^2)/(2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(sec(c + d*x)/(sin(c + d*x) + csc(c + d*x)), x)

________________________________________________________________________________________